<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>

	</head>
	<link rel="stylesheet" href="css/main.css" />
	<link rel="stylesheet" type="text/css" href="layui/css/layui.css" />

	<style>
		body {
			background: url(img/login.png)  no-repeat center center !important;background-size: 100%;height: 100%;
		}
		
		#login {
			width: 567px;
			height: 669px;
			background: rgba(255, 255, 255, .8);
		}
		#logo{margin-left: 360px;margin-top: 39px;}
	</style>

	<script src="js/jquery-3.2.1.min.js"></script>
	<script type="text/javascript" src="layui-v2.2.4/layui-v2.2.4/layui/layui.js"></script>
	<script type="text/javascript" src="js/main.js"></script>

	
	
	
	
		
	

	<body>
		<!--<img src="img/logo1.png" alt="" id="logo" />-->
		<div id="login" class="allCenter">
			<h2>登录微信跟单管理系统</h2>
			<p>致力于打造全面的、一体化的跟单管理系统</p>

			<div class="box">
<!--                <a href="###">账号登录</a>-->
				<input type="text" placeholder="账    号：" id="id" />
				<br />

				<input type="password" placeholder="密    码：" id="pass" />
				<br />
				<input type="checkbox" id="remberMe" style="width: 16px;height: 16px;margin-right: 14px;position: relative;top: 2px;" /><span>记住密码</span>
				<button id="logOn">登   录</button>
			</div>
			

		</div>
	</body>

</html>
<script>
$('body').height($(window).height());
	$(window).resize(function() {
		$('body').height($(window).height());

	})
	$("#logOn").click(function() {
		if($('#id').val() == "" || $('#pass').val() == "") {
			alert("账号密码不能为空！")
		} else {
			$.ajax({
				type: "post",
				url: "/wechat_mt5/admin/login",

				data: {
					username: $('#id').val(),
					password: $('#pass').val(),
					rememberMe:$("#remberMe")[0].checked

				},
				success: function(data) {
                       if(data.code=="0"){
                          sessionStorage.setItem("id",$('#id').val()); 
                          window.location.href="html/index.html";
                          
                       
                       }else{
                       	 prompt(data.error);                     
                       }
				}

			})

		}


	})
</script>